package com.googlecode.bindyj.function;

public abstract class Func2<R, A, B> implements Func<R> {

  @SuppressWarnings("unchecked")
  public R call(Object... args) {
    FuncPreconditions.checkArgumentCount(2, args.length);

    return call((A) args[0], (B) args[1]);
  }

  protected abstract R call(A a, B b);
}
